﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "IGisMap.h"
#include "IDocument.h"
#include "GcmpModelInterface.h"

namespace gcmp
{
    class GCMP_MODEL_INTERFACE_EXPORT IGisSystem
    {
    public:
        virtual ~IGisSystem();
        static IGisSystem* Get();

        /// \brief  使用投影类型来创建map的投影
        /// \param[in]    GcmpGisProjectionType typeProjection
        virtual void SetMapSpatialReference(GcmpGisProjectionType typeProjection) = 0;

        /// \brief 使用投影信息来创建map的投影
        /// \param[in]    const std::wstring& infoProjection
        virtual void SetMapSpatialReference(const std::wstring& infoProjection) = 0;

        /// \brief    创建Map对象
        /// \param[in]    IDocument* pDoc
        /// \return       OwnerPtr<IGisMap>
        virtual OwnerPtr<IGisMap> CreateGisMap(IDocument* pDoc) = 0;

        /// \brief   设置缓存地址
        /// \param[in]    const std::wstring& strFolder
        virtual bool SetCachePath(const std::wstring& strFolder) = 0;

        /// \brief  获取缓存地址
        /// \return       std::wstring
        virtual std::wstring GetCachePath() const = 0;

        /// \brief  设置缓存大小
        /// \param[in]    float Value  单位MB
        virtual void SetCacheMemorySize(float Value) = 0;

        /// \brief 获取缓存大小
        /// \return       float
        virtual float GetCacheMemorySize() const = 0;

        /// \brief  设置gis数据渲染的线程数量
        /// \param[in]    int number
        virtual void SetRenderThreadNumber(int number) = 0;

        /// \brief  获取gis数据渲染的线程数量
        /// \return       int
        virtual int GetRenderThreadNumber() const= 0;
    protected:
        static IGisSystem* m_pGisSystem;
    };

}

